package lab03.test01;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

/**
 * Created by V555 on 2017/11/30.
 */
public class Test2 {
    public static void main(String[] args) {
        BufferedReader reader=null;
        String path="D:\\hello.txt";
        try {
            reader=new BufferedReader(new FileReader(path));
            String line=null;
            try {
                while ((line=reader.readLine())!=null){

                    System.out.println(line);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }finally {
            try {
                reader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
